<html xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>commandButton
          (JSF 2.1 View Declaration Language: JSP Variant)
        </title>
<meta name="keywords" content="$title">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<script>
            function asd()
            {
            parent.document.title="commandButton (JSF 2.1 View Declaration Language: JSP Variant)";
            }
          </script>
<body bgcolor="white" onload="asd();">
<a name="navbar_top"></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_top_firstrow"></a>
<table BORDER="0" CELLPADDING="0" CELLSPACING="3">
<tr ALIGN="center" VALIGN="top">
<td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>&nbsp;</td><td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">&nbsp;Tag&nbsp;</font>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td><td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
</tr>
<tr>
<td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td><td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                &nbsp;<a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>&nbsp;
                &nbsp;<a href="commandButton.html" target="_top"><b>NO FRAMES</b></a>&nbsp;
                <script></script>
<noscript>
<a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a>
</noscript>
</font></td>
</tr>
</table>
<hr>
<h2>
<font size="-1">h</font>
<br>
            Tag commandButton</h2>
<hr><p><span class="changed_modified_2_0 changed_modified_2_0_rev_a">Renders</span> an HTML "input" element.</p> <p>Decode Behavior</p> <ul> <p>Obtain the <code>Map</code> from the "requestParameterMap" property of the <code>ExternalContext</code>. If the value in the <code>Map</code> for the value of the "clientId" property of the component is <code>null</code>, create a String by concatenating the value of the "clientId" property of the component with the String ".x" (without the quotes). Create another String in the same manner, but concatenate ".y" (without the quotes). If <code>null</code> is the value in the <code>Map</code> for both Strings, return from <code>decode()</code>. If the value in the <code>Map</code> for the value of the "clientId" property of the component is not <code>null</code>, get the value of the "type" attribute, and convert it to lower case. If the result is equal to the String "reset" (without the quotes), return from <code>decode()</code>. Otherwise, create a <code>javax.faces.event.ActionEvent</code> around the component, and pass it to the <code>queueEvent()</code> method of the component, which must be an instance of <code>UICommand</code>.</p> </ul> <p>Encode Behavior</p> <ul> <p>Render the clientId of the component as the value of the "name" attribute. Render the current value of the component as the value of the "value" attribute. If "image" attribute is specified render it as the value of the "src" attribute after passing it to the <code>getResourceURL()</code> method of the <code>ViewHandler</code> for this application, and passing the result through the <code>encodeResourceURL()</code> method of the <code>ExternalContext</code>. <span class="changed_added_2_0">Note that calling <code>getResourceURL()</code> will prefix the context-root of the current application if the value of the "src" attribute starts with "/".</span> When handling the "image" attribute, the value must not be escaped. For example, <code>&</code> must not be turned into <code>&amp;amp;</code>. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute. If the user has specified an "onclick" attribute, append that JavaScript to any existing JavaScript <span class="changed_modified_2_0_rev_a">already being output by the implementation before rendering.</span></p> <p class="changed_added_2_0">If the component being rendered by this renderer has any <code>UIParameter</code> children, each one of them must be rendered using the renderer for component-family: "javax.faces.Input" and renderer-type: "javax.faces.Hidden". For discussion, this is called the hiddenRenderer. A component with component-type "javax.faces.Input" must be created for local use in rendering each <code>UIParameter</code> child. The "id" property of the temporary component must be set to the "name" of the <code>UIParameter</code>. The "value" property of the temporary component must be set to the "value" of the <code>UIParameter</code>. For each <code>UIParameter</code> child, the hiddenRenderer must have its <code>encodeBegin()</code>, <code>encodeChildren()</code>, and <code>encodeEnd()</code> methods called, in order, passing the temporary component as the second argument.</p> </ul><br>
<p></p>
<hr>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2"><font size="+2"><b>Tag Information</b></font></td>
</tr>
<tr>
<td>Tag Class</td><td>com.sun.faces.taglib.html_basic.CommandButtonTag</td>
</tr>
<tr>
<td>TagExtraInfo Class</td><td><i>None</i></td>
</tr>
<tr>
<td>Body Content</td><td>JSP</td>
</tr>
<tr>
<td>Display Name</td><td><i>None</i></td>
</tr>
</table>
<br>
<p></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="5"><font size="+2"><b>Attributes</b></font></td>
</tr>
<tr>
<td><b>Name</b></td><td><b>Required</b></td><td><b>Request-time</b></td><td><b>Type</b></td><td><b>Description</b></td>
</tr>
<tr valign="top">
<td>action</td><td>false</td><td>false</td><td><code>javax.el.MethodExpression</code>
<br>(<i>signature must match </i><code>java.lang.Object action()</code>)
                    </td><td>MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a public method that takes no parameters, and returns an Object (the toString() of which is called to derive the logical outcome) which is passed to the NavigationHandler for this application.</td>
</tr>
<tr valign="top">
<td>actionListener</td><td>false</td><td>false</td><td><code>javax.el.MethodExpression</code>
<br>(<i>signature must match </i><code>void actionListener(javax.faces.event.ActionEvent)</code>)
                    </td><td><p> MethodExpression representing an action listener method that will be notified when this component is activated by the user. The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void, <span class="changed_added_2_0">or to a public method that takes no arguments with a return type of void. In the latter case, the method has no way of easily knowing where the event came from, but this can be useful in cases where a notification is needed that "some action happened".</span> </p></td>
</tr>
<tr valign="top">
<td>id</td><td>false</td><td>true</td><td><code>java.lang.String</code></td><td>The component identifier for this component. This value must be unique within the closest parent component that is a naming container.</td>
</tr>
<tr valign="top">
<td>immediate</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>boolean</code>)
                    </td><td>Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase.</td>
</tr>
<tr valign="top">
<td>rendered</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>boolean</code>)
                    </td><td>Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true.</td>
</tr>
<tr valign="top">
<td>value</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.Object</code>)
                    </td><td>The current value of this component.</td>
</tr>
<tr valign="top">
<td>accesskey</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Access key that, when pressed, transfers focus to this element.</td>
</tr>
<tr valign="top">
<td>alt</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Alternate textual description of the element rendered by this component.</td>
</tr>
<tr valign="top">
<td>dir</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).</td>
</tr>
<tr valign="top">
<td>disabled</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>boolean</code>)
                    </td><td>Flag indicating that this element must never receive focus or be included in a subsequent submit. A value of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as disabled="disabled".</td>
</tr>
<tr valign="top">
<td>image</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td><p> Absolute or relative URL of the image to be displayed for this button. If specified, this "input" element will be of type "image". Otherwise, it will be of the type specified by the "type" property with a label specified by the "value" property. <span class="changed_added_2_0">Note that if the value of this attribute starts with "/", the rendered value for this attribute will be prefixed with the context-root for this application.</span> </p></td>
</tr>
<tr valign="top">
<td>label</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>A localized user presentable name for this component.</td>
</tr>
<tr valign="top">
<td>lang</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Code describing the language used in the generated markup for this component.</td>
</tr>
<tr valign="top">
<td>onblur</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when this element loses focus.</td>
</tr>
<tr valign="top">
<td>onchange</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when this element loses focus and its value has been modified since gaining focus.</td>
</tr>
<tr valign="top">
<td>onclick</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is clicked over this element.</td>
</tr>
<tr valign="top">
<td>ondblclick</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is double clicked over this element.</td>
</tr>
<tr valign="top">
<td>onfocus</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when this element receives focus.</td>
</tr>
<tr valign="top">
<td>onkeydown</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a key is pressed down over this element.</td>
</tr>
<tr valign="top">
<td>onkeypress</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a key is pressed and released over this element.</td>
</tr>
<tr valign="top">
<td>onkeyup</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a key is released over this element.</td>
</tr>
<tr valign="top">
<td>onmousedown</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is pressed down over this element.</td>
</tr>
<tr valign="top">
<td>onmousemove</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is moved within this element.</td>
</tr>
<tr valign="top">
<td>onmouseout</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is moved away from this element.</td>
</tr>
<tr valign="top">
<td>onmouseover</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is moved onto this element.</td>
</tr>
<tr valign="top">
<td>onmouseup</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when a pointer button is released over this element.</td>
</tr>
<tr valign="top">
<td>onselect</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Javascript code executed when text within this element is selected by the user.</td>
</tr>
<tr valign="top">
<td>readonly</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>boolean</code>)
                    </td><td>Flag indicating that this component will prohibit changes by the user. The element may receive focus unless it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as readonly="readonly".</td>
</tr>
<tr valign="top">
<td>style</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>CSS style(s) to be applied when this component is rendered.</td>
</tr>
<tr valign="top">
<td>styleClass</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.</td>
</tr>
<tr valign="top">
<td>tabindex</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.</td>
</tr>
<tr valign="top">
<td>title</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Advisory title information about markup elements generated for this component.</td>
</tr>
<tr valign="top">
<td>type</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>java.lang.String</code>)
                    </td><td>Type of button to create. Valid values are "submit", "button", and "reset". If not specified, or not a valid value, the default value is "submit".</td>
</tr>
<tr valign="top">
<td>binding</td><td>false</td><td>false</td><td><code>javax.el.ValueExpression</code>
<br>(<i>must evaluate to </i><code>javax.faces.component.UIComponent</code>)
                    </td><td>The ValueExpression linking this component to a property in a backing bean</td>
</tr>
</table>
<br>
<p></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="5"><font size="+2"><b>Variables</b></font></td>
</tr>
<td colspan="2"><i>No Variables Defined.</i></td>
</table>
<br>
<p></p>
<a name="navbar_bottom"></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_bottom_firstrow"></a>
<table BORDER="0" CELLPADDING="0" CELLSPACING="3">
<tr ALIGN="center" VALIGN="top">
<td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>&nbsp;</td><td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">&nbsp;Tag&nbsp;</font>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td><td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
</tr>
<tr>
<td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td><td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                &nbsp;<a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>&nbsp;
                &nbsp;<a href="commandButton.html" target="_top"><b>NO FRAMES</b></a>&nbsp;
                <script></script>
<noscript>
<a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a>
</noscript>
</font></td>
</tr>
</table>
<hr>
<small><i>
            Output Generated by 
            <a href="http://taglibrarydoc.dev.java.net/" target="_blank">Tag Library Documentation Generator</a>.
            Java, JSP, and JavaServer Pages are trademarks or 
            registered trademarks of Sun Microsystems, Inc. in the US and other
            countries.  Copyright 2002-4 Sun Microsystems, Inc.
            4150 Network Circle
            Santa Clara, CA 95054, U.S.A.
            All Rights Reserved. 
            </i></small>
</body>
</html>
